<template>
    <div>
        <a-modal
            width="400px"
            :visible="props.visible"
            modal-class="nvb_login_modal"
            title="用户登录"
            :footer="false"
            @cancel="close"
        >
            <nvb_login_form ref="loginFormRef" @on-ok="close"></nvb_login_form>
        </a-modal>
    </div>
</template>

<script setup lang="ts">
import Nvb_login_form from '@/components/common/nvb_login_form.vue'
import { ref } from 'vue'

type Props = {
    visible: boolean
}

const props = defineProps<Props>()
const emits = defineEmits(['update:visible'])

const loginFormRef = ref<InstanceType<typeof Nvb_login_form>>()

function close() {
    loginFormRef.value?.formReset()
    emits('update:visible', false)
}
</script>

<style lang="scss">
.nvb_login_modal {
    .arco-modal-header {
        display: none;
    }
}
</style>
